﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<DrugStore.Helper.PaginateList<DrugStore.Models.Disease>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Quản lý bệnh thường gặp
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="main" runat="server">
    <h2>Quản lý bệnh án</h2>
    <table cellpadding="0" cellspacing="0" class="data">
        <thead>
            <tr class="data">
                <th class="data" width="85px" scope="col">
                    <a href="#">Tên bệnh</a>
                </th>
                <th class="data" width="200px">
                    <a href="#">Mô tả</a>
                </th>
                <th class="data" width="10px"></th>
            </tr>            
        </thead>
        <tbody>
            <%foreach (DrugStore.Models.Disease d in Model)
              {
            %>
               <tr>
                 <td width="75px" ><%: d.DiesaseName %></td>
                 <td width="250px"><%: d.BriefDesc %></td>
                 <td>
                   <p><%: Html.ActionLink("Sửa", "Edit", new { id =d.DiseaseId })%></p>     
                    <a href="#">Xóa</a>
                 </td>
               </tr>
            <% }%>
        </tbody>
    </table>   
    <div class="pagination">
            <% if (Model.HasPreviousPage)
               { %><%:Html.ActionLink("Trang Đầu", "Index", new { pageindex = 1, keyword = Model.KeyWord })%>
               <%} %>
            <% if (Model.HasPreviousPage)
            { %><%:Html.ActionLink("Trang Trước", "Index", new { pageindex = (Model.PageIndex-1), keyword = Model.KeyWord })%>
            <%} %>
            Trang <%: Model.PageIndex %> / <%: Model.TotalPages %>
            <% if (Model.HasNextPage)
            { %><%:Html.ActionLink("Trang Tiếp", "Index", new { pageindex = (Model.PageIndex+1), keyword = Model.KeyWord })%>
            <%} %>
            <% if (Model.HasNextPage)
            { %><%:Html.ActionLink("Trang Cuối", "Index", new { pageindex = Model.TotalPages, keyword = Model.KeyWord })%>
            <%} %>  
    <div style="float:right;">
                <a href="/ManageNews/AddCategory">Thêm Danh mục tin</a>  <a href="/ManageDisease/Add">Thêm bệnh án</a>
    </div>       
    </div>           
</asp:Content>
